package com.baiyang.server.service.article.impl;


import com.baiyang.server.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baiyang.server.dao.article.ArticleReadNumDao;
import com.baiyang.server.model.article.ArticleReadNum;
import com.baiyang.server.service.article.ArticleReadNumService;

import java.util.List;

/**
 * 
 * @author XVX
 * BY: @Primary 注解帮助生命@Autowired优先注入的实列
 */
@Service	
public class ArticleReadNumServiceImpl extends BaseServiceImpl<ArticleReadNumDao, ArticleReadNum> implements ArticleReadNumService{

    @Autowired
    private ArticleReadNumDao articleReadNumDao;

    @Override
    public List<String> getTop(int i) {
        return articleReadNumDao.getTop(i);
    }

    @Override
    public Integer selectAllNum(String id) {
        return articleReadNumDao.getNum(id);
    }
}
